package com.classtest.act;

public class Person {
    private String name;//姓名
    private int age;//年龄
    private String sex;//性别

    public Person(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    //自我介绍
    public void selfIntroduction() {
        System.out.println("大家好！我是" + this.name);
        System.out.println("今年" + this.name);
    }
}
